import Cookies from "js-cookie";

const TokenKey = "Web-Token";

export function getToken() {
  return Cookies.get(TokenKey);
}

export function setToken(token) {
  return Cookies.set(TokenKey, token);
}

export function removeToken() {
  return Cookies.remove(TokenKey);
}

/** 格式化token（jwt格式） */
export const formatToken = (token) => {
  return "Bearer " + token;
};
